abstract class BaseAbstract{
    constructor(
        protected el=document.createElement("canvas"),
        public ctx=el.getContext("2d")
    ){}
}

class Canvas extends BaseAbstract{
    constructor(){
        super()
        console.log(this.ctx);
    }
    
}

new Canvas